#include<ros/ros.h>
#include<std_srvs/Empty.h>
//设置参数
int main(int argc, char** argv){
	ros::init(argc, argv,"set_bg_color");
	ros::NodeHandle nh;
	
	//等待service（clear）出现
	ros::service::waitForService("clear");

	ros::param::set("background_r",255);
	ros::param::set("background_g",255);
	ros::param::set("background_b",255);

	ros::ServiceClient clearClient = nh.serviceClient<std_srvs::Empty>("/clear");

	std_srvs::Empty srv;
	//请求/clear服务 因为参数被从新设置了,所以颜色会改变
	clearClient.call(srv);
}
